package chixing.day19;
public class Consumer extends Thread{
    private PublicResource resource;

    public Consumer(PublicResource resource) {
        this.resource = resource;
    }

    @Override
    public void run() {
        while (true){
            resource.consume();
        }
    }
}
